home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10090 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: given: char foo[80]; there is no such thing as element foo[80] correct? (i.e. foo[80] = '\0' is beyond the array boundary)
  5. Date: Fri, 15 Mar 96 15:39:42 GMT
  6. Organization: none
  7. Message-ID: <826904382snz@genesis.demon.co.uk>
  8. References: <3148DBB6.1353@hawaii.edu>
  9. Reply-To: fred@genesis.demon.co.uk
  10. X-NNTP-Posting-Host: genesis.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.27
  12. X-Mail2News-Path: genesis.demon.co.uk
  13.  
  14. In article <3148DBB6.1353@hawaii.edu> davec@hawaii.edu "Dave Carien" writes:
  15.  
  16. >Yes or no on this, I just recently got confused by two different books. I 
  17. >assume that the declaration foo[80] allocates storage for elements 0-79. 
  18. >A string could be terminated by doing something like foo[79] = '\0', but 
  19. >foo[80] = '\0' would be invalid because such an element does not exist. 
  20. >Just looking for confirmation that I'm right here. A simple Y or N will 
  21. >do thanks.
  22.  
  23. That is correct, sorry Y
  24.  
  25. -- 
  26. -----------------------------------------
  27. Lawrence Kirby | fred@genesis.demon.co.uk
  28. Wilts, England | 70734.126@compuserve.com
  29. -----------------------------------------
  30.